
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel=stylesheet href='include/hoj.css' type='text/css'>
</head>
<body>
<center>
<div style="width:90%; text-align:left">
<img src="image/logo.png"/>
</div>
<table width=96%> 
	<tr align="center" class='hd' valign="top">
				<th><a href="faqs.php">F.A.Qs</a></th>
		<th><a href="./bbs.php">Web Board</a></th>
		<th><a href="./">Home</a></th>
		<th><a href="./problemset.html">ProblemSet</a></th>
		<th><a href="./status.php">Status</a></th>
		<th><a href="./ranklist.php">Ranklist</a></th>
		<th><a href="./contest.php">Contest</a></th>
		<th><a href=loginpage.php>Login</a></th><th><a href=registerpage.php>Register</a></th>	</tr>
</table>
</center>
<center>
<div class="notice">
	<div>
		<B>Notice:</B>鉴于种种原因，本OJ自下周星期一（3月5号）开始不再全面开放，请各位做好善后事宜，谢谢合作。	</div>
</div>
</center>
</div>
<title>Problem 2060. -- [Usaco2010 Nov]Visiting Cows 拜访奶牛 -- 衡阳八中OJ离线版-2012-02-29</title><center><h2>2060: [Usaco2010 Nov]Visiting Cows 拜访奶牛</h2><span class=green>Time Limit: </span>3 Sec&nbsp;&nbsp;<span class=green>Memory Limit: </span>64 MB<br><span class=green>Submit: </span>128&nbsp;&nbsp;<span class=green>Solved: </span>93<br>[<a href='submitpage.php?id=2060'>Submit</a>][<a href='problemstatus.php?id=2060'>Status</a>][<a href='bbs.php?id=2060'>Discuss</a>]</center><h2>Description</h2><div class=content>经过了几周的辛苦工作,贝茜终于迎来了一个假期.作为奶牛群中最会社交的牛,她希望去拜访N(1<=N<=50000)个朋友.这些朋友被标号为1..N.这些奶牛有一个不同寻常的交通系统,里面有N-1条路,每条路连接了一对编号为C1和C2的奶牛(1 <= C1 <= N; 1 <= C2 <= N; C1<>C2).这样,在每一对奶牛之间都有一条唯一的通路.
FJ希望贝茜尽快的回到农场.于是,他就指示贝茜,如果对于一条路直接相连的两个奶牛,贝茜只能拜访其中的一个.当然,贝茜希望她的假期越长越好,所以她想知道她可以拜访的奶牛的最大数目.
</div><h2>Input</h2><div class=content>第1行:单独的一个整数N
第2..N行:每一行两个整数,代表了一条路的C1和C2.
</div><h2>Output</h2><div class=content>单独的一个整数,代表了贝茜可以拜访的奶牛的最大数目.
</div><h2>Sample Input</h2>
			<div class=content><span class=sampledata>7<br />
6 2<br />
3 4<br />
2 3<br />
1 2<br />
7 6<br />
5 6<br />
<br />
<br />
INPUT DETAILS:<br />
<br />
Bessie knows 7 cows. Cows 6 and 2 are directly connected by a road,<br />
as are cows 3 and 4, cows 2 and 3, etc. The illustration below depicts the<br />
roads that connect the cows:<br />
<br />
                       1--2--3--4<br />
                          |<br />
                       5--6--7<br />
<br />
<br />
</span></div><h2>Sample Output</h2>
			<div class=content><span class=sampledata>4<br />
<br />
OUTPUT DETAILS:<br />
<br />
Bessie can visit four cows. The best combinations include two cows<br />
on the top row and two on the bottom. She can't visit cow 6 since<br />
that would preclude visiting cows 5 and 7; thus she visits 5 and<br />
7. She can also visit two cows on the top row: {1,3}, {1,4}, or<br />
{2,4}.<br />
<br />
</span></div><h2>HINT</h2>
			<div class=content><p></p></div><h2>Source</h2>
			<div class=content><p><a href='problemset.html?search=Gold'>Gold</a></p></div><center>[<a href='submitpage.php?id=2060'>Submit</a>][<a href='problemstatus.php?id=2060'>Status</a>][<a href='bbs.php?id=2060'>Discuss</a>]</center>﻿<br>

<a href="./"><span class=red>HOME</span></a>
<a href="javascript:history.go(-1)"><span class=red>Back</span></a>

<hr>
<center>
	<div class="footer">
			<a href=setlang.php?lang=ko>한국어</a>&nbsp;
		<a href=setlang.php?lang=cn>中文</a>&nbsp;
		<a href=setlang.php?lang=fa>فارسی</a>&nbsp;
		<a href=setlang.php?lang=en>English</a>&nbsp;
		<a href=setlang.php?lang=th>ไทย</a>
	<br>		<div>版权所有 &copy;2008-2012 WaterPark Organization. | <script src="http://s21.cnzz.com/stat.php?id=2982771&web_id=2982771" language="JavaScript"></script>
</div>
		<div>Based on opensource project <a href="http://hustoj.googlecode.com">hustoj</a>.</div>
	</div>
</center>
</body>
</html>
